/* Tree.h
 * Defines a personalized tree to organize the rendering objects
 *
 * Last Modified: 08.12.2013
 * Author: Guilherme S.G.
 */

#ifndef __JB_TREE_H__
#define __JB_TREE_H__

#include <vector>

template<class T>
class Tree
{
private:
    unsigned int size;
    std::vector<T*> child;
    T *parent;
    
public:
    Tree()
    {
        size = 0;
        parent = NULL;
    }
    ~Tree()
    {
        for(int i = 0; i < child.size(); i++)
            delete child[i];
        
        child.clear();
    }
    
    bool empty()    {return (size == 0);}
    
    void addNode();
    void removeNode();
    void clear();
    
};



#endif
